import { Empty } from 'antd'
export const searchConfig = ({
  SpuOptions,
  handleSearchSpuOptions,
}: {
  SpuOptions: IOptionItem[]
  handleSearchSpuOptions: (newValue?: string) => void
}) => {
  return [
    {
      label: 'SKU商品',
      name: 'skuCode',
      placeholder: '商品条码',
      type: 'Input',
    },
    {
      label: 'SPU商品',
      name: 'spuId',
      type: 'Select',
      placeholder: '款式编码/款式名称/助记码',
      option: SpuOptions,
      config: {
        suffixIcon: null,
        showSearch: true,
        filterOption: false,
        optionFilterProp: 'label',
        onSearch: handleSearchSpuOptions,
        notFoundContent: <Empty description="请输入内容搜索" image={Empty.PRESENTED_IMAGE_SIMPLE} />,
      },
    },
  ]
}
